<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include::header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>   </h5>
				</div>
				<div class="ibox-content">
					<form class="form-horizontal m-t layui-form" id="signupForm">
						<input id="id" name="id" type="hidden" th:value="${dorm.id}">
						<div class="form-group">
							<label class="col-sm-3 control-label">宿舍编号：</label>
							<div class="col-sm-8">
								<input id="dormId" name="dormId" class="form-control"
									   type="text" th:value="${dorm.dormId}">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">所属楼宇：</label>
							<div class="col-sm-8">
								<select id="floorName" lay-filter="floorName" class="layui-input-inline" name="floorId">
									<option value="" selected="">请选择宿舍楼</option>
									<option th:each="floor:${floors}" th:value="${floor.id}"   th:selected="${dorm.getFloorId() eq floor.getId()}">[[${floor.floorName}]]</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">宿舍名称：</label>
							<div class="col-sm-8">
								<input id="dormName" name="dormName" class="form-control" th:value="${dorm.dormName}"
									   type="text">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">宿舍类型：</label>
							<div class="col-sm-8">
								<select id="dormType" lay-filter="dormType" class="layui-input-inline" name="dormType">
									<option value="" selected="">请选择类型</option>
									<option value="1" selected="selected">学生</option>
									<option value="0" selected="">宿管</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">其他附加：</label>
							<div class="col-sm-8">
								<input id="dormAppend" name="dormAppend" class="form-control" th:value="${dorm.dormAppend}"
									   type="text">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">状态：</label>
							<div class="layui-input-inline">
									<input type="radio" name="dormStatus"
										   th:field="*{dorm.dormStatus}" value="1" title="可用" />
								<input type="radio" th:field="*{dorm.dormStatus}" name="dormStatus" value="0" title=" 不可用"/>

							</div>
						</div>

						<div class="form-group">
							<div class="col-sm-8 col-sm-offset-3">
								<button type="submit" class="btn btn-primary">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
	<div th:include="include::footer"></div>
	<script th:src="@{/static/js/admin/dorm/dorm_edit.js}"></script>
</body>
<script>
    layui.use(['form'], function () {

    });
</script>
</html>
